Previous | Next

# Useful top options

Key | Description
--- | ---
P | sort by %CPU
M | sort by %MEM
T | sort by total time

Batch mode: top -b -n 1

Be sure to read the "STUPID TRICKS Sampler" at the end of the top manual page.

Using TOP more efficiently

Make current column visible with x then use < > to change the sort column

Top is great for interactive use. But it's a pain to use in batch mode. If you want to run a batch script or save up info, you're better off using ps.